package primetest.dto;

import java.util.Date;
import java.util.UUID;



public class NewsDto {
	private String key;
	private String title;
	private String content;
	private Date date;
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}

	public NewsDto(String key, String title, String content, Date date) {
		this.key = key;
		this.title = title;
		this.content = content;
		this.date = date;
	}

	public NewsDto() {
		this.key = UUID.randomUUID().toString();
		this.date = new Date(System.currentTimeMillis());
	}

	public void setAll(NewsDto d) {
		this.key = d.key;
		this.title = d.title;
		this.content = d.content;
		this.date = d.date;
	}

	public boolean isValid() {
		return true;
	}
}
